package com.mangrove;

import com.REST.RestEngine;

import android.app.Activity;
import android.content.ContentResolver;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.Contacts.People;
import android.util.Log;
import android.widget.ListView;
import android.widget.TextView;


public class MainPanel extends Activity {
	@Override
	public void onCreate(Bundle bdl){
		super.onCreate(bdl);
		/*String[] proj = new String[]{
				People._ID,
				People.NAME,
				People.NUMBER,
		};
		
		ContentResolver cr = getContentResolver();
		Cursor cur = cr.query(People.CONTENT_URI, proj, null, null, null);
		
		if (cur.moveToFirst()){
			int nameIndex = cur.getColumnIndex(People.NAME);
			int numberIndex = cur.getColumnIndex(People.NUMBER);
			String name = null;
			String number = null;
			do{
				name = cur.getString(nameIndex);
				number = cur.getString(numberIndex);
				
				Log.v(name,number);
			}while (cur.moveToNext());
		}
		
		cur.close();
		
		ListView listv = new ListView(this);
		setContentView(listv);*/
		
		RestEngine rest = new RestEngine("http://api.t.sina.com.cn", "85565789", "xml");
		
		rest.SetBaseAuth("tamwaiban83@gmail.com", "tan1983923");
		//rest.getPublicTimeline(10);
		rest.test(this,"http://tp4.sinaimg.cn/1763374151/50/1277565115/0", "/sdcard/dl.xml");
		
		TextView tv = new TextView(this);
		setContentView(tv);

	}
}
